package com.mybatis.jpa.context;

/**
 * 多租户支持
 */
public class MultiTenancyContext {
    private static  ThreadLocal<String> providerIdLocal = new ThreadLocal();

    /**
     * 设置供应商id
     * @param providerId
     */
    public static void setProviderId(String providerId)
    {
        providerIdLocal.set(providerId);
    }

    /**
     * 获取供应商id
     * @return 供应商id
     */
    public static String getProviderId()
    {
        return providerIdLocal.get();
    }
}
